<script setup>
import { getCurrentInstance } from 'vue';
const props = defineProps({
  msg: {
    type: String,
    required: true,
  },
})
const emits = defineEmits(['testEmit'])

const instance = getCurrentInstance()
console.log(instance, '====');


console.log(props.msg, '---');
const testFunc = () => {
  console.log(4444444);

  
}
setTimeout(() => {
  emits('testEmit', 888)
}, 3000);


defineExpose({
  testFunc
})



</script>

<template>
  <p>=================</p>
  <div>这是子组价</div>
  <p>msg: {{ msg }}</p>
  <p>=============</p>
</template>

<style scoped>
</style>
